<template>
  <h1>El组件-单选</h1>
  <el-radio-group v-model="gender">
    <el-radio label="男" value="1"></el-radio>
    <el-radio label="女" value="2"></el-radio>
  </el-radio-group>
  <h4>您选择的性别是：{{gender}}</h4>

  <hr>

  <el-radio-group v-model="edu">
    <el-radio label="高中" value="gz"></el-radio>
    <el-radio label="大专" value="dz"></el-radio>
    <el-radio label="本科" value="bk"></el-radio>
  </el-radio-group>
  <h4>您选择的学历是：{{edu}}</h4>

  <hr>
  <el-radio-group v-model="level">
    <el-radio label="员工" value="10"></el-radio>
    <el-radio label="经理" value="20"></el-radio>
    <el-radio label="总监" value="30"></el-radio>
    <el-radio label="总裁" value="40"></el-radio>
  </el-radio-group>
  <h4>您选择的等级是：{{level}}</h4>
  <hr>
  <el-radio-group v-model="pr">
    <el-radio-button v-for="p in arr2" :label="p.title" :value="p.price"></el-radio-button>
  </el-radio-group>
  <h4>您选择的价格是：{{pr}}</h4>

</template>
<script setup>
import { ref } from 'vue'
const gender = ref('1')

const edu = ref('bk')

const level = ref('10')

const pr=ref(100)
const arr2=[
  {title:'商品1',price:100},
  {title:'商品2',price:200},
  {title:'商品3',price:300},
  {title:'商品4',price:400},
]

</script>


<style scoped>

</style>